﻿using BCCommon;
using BCDto.WeChatComponent.WeChatMediaRecord;
using System;
using System.Collections.Generic;

namespace BCService.WeChatComponent.WeChatMediaRecordService
{
    /// <summary>
    /// 微信素材记录服务接口
    /// </summary>
    public interface IWeChatMediaRecordService
    {
        /// <summary>
        /// 添加微信多媒体文件上传记录
        /// </summary>
        /// <param name="weChatMediaRecordDto">微信多媒体文件上传记录</param>
        bool Add(WeChatMediaRecordDto weChatMediaRecordDto);
        /// <summary>
        /// 获取微信多媒体文件记录
        /// </summary>
        /// <param name="mediaId">素材Id</param>
        /// <returns></returns>
        WeChatMediaRecordDto GetEntity(string mediaId);
        /// <summary>
        /// 获取微信多媒体文件上传记录
        /// </summary>
        /// <param name="mediaId">素材Id</param>
        /// <param name="fileName">文件名称</param>
        /// <param name="start">开始时间</param>
        /// <param name="end">结束时间</param>
        /// <param name="fileType">文件类型</param>
        /// <param name="isTemporary">临时素材</param>
        /// <param name="ascending">排序</param>
        /// <param name="pageIndex">当前页码</param>
        /// <param name="pageSize">每页数据条数</param>
        /// <returns></returns>
        PageableList<WeChatMediaRecordDto> GetRecords(string mediaId,string fileName, DateTime? start, DateTime? end, string fileType,bool? isTemporary, bool? ascending, int pageIndex = 1, int pageSize = 10);
        /// <summary>
        /// 删除微信媒体文件上传记录
        /// </summary>
        /// <param name="mediaId">微信媒体文件Id</param>
        void Delete(string mediaId);
        /// <summary>
        /// 删除微信媒体文件上传记录
        /// </summary>
        /// <param name="mediaIds">微信媒体文件Ids</param>
        void Delete(string[] mediaIds);
        /// <summary>
        /// 获取微信各个媒体文件上传记录总数
        /// </summary>
        /// <returns></returns>
        WeChatMediaRecordCountDto Count();
        /// <summary>
        /// 同步微信永久素材
        /// </summary>
        void SynchronizeWeChatPermanentMaterial();
        /// <summary>
        /// 上传临时文件到微信
        /// </summary>
        IEnumerable<WeChatMediaRecordDto> UploadTemporaryFileToWeChat();

    }
}
